package es.truscoandrisco.discotecasmadrid;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import android.graphics.drawable.Drawable;


public class Discoteca{

	private String nombre, direccion, descripcion, evento1, evento2, logo, imagen, fecha, premium;
	private int longitud, latitud;
	private Drawable i_logo = null;
	private Drawable i_imagen = null;
	
	public Discoteca(String nombre, String direccion, String descripcion, String evento1, String evento2,
						String logo, String imagen, String fecha, String premium, int longitud, int latitud,
						Drawable i_imagen, Drawable i_logo){
		
		this.nombre = nombre;
		this.direccion = direccion;
		this.descripcion = descripcion;
		this.evento1 = evento1;
		this.evento2 = evento2;
		this.logo = logo;
		this.imagen = imagen;
		this.longitud = longitud;
		this.latitud = latitud;
		this.i_imagen = i_imagen;
		this.i_logo = i_logo;
		this.fecha = fecha;
		this.premium = premium;
	}
	
	public String getNombre(){
		return this.nombre;
	}
	
	public String getDireccion(){
		return this.direccion;
	}
	public String getDescripcion(){
		return this.descripcion;
	}
	public String getEvento1(){
		return this.evento1;
	}
	public String getEvento2(){
		return this.evento2;
	}
	public String getLogo(){
		return this.logo;
	}
	public String getImagen(){
		return this.imagen;
	}
	public int getLongitud(){
		return this.longitud;
	}
	public int getLatitud(){
		return this.latitud;
	}
	
	public Drawable getLogoImg(){
		return i_logo;
	}
	
	public Drawable getImagenImg(){
		return i_imagen;
	}
	
	public String getFecha(){
		return fecha;
	}
	
	public String getPremium(){
		return premium;
	}
	
	public Drawable setLogoImg(String url, String srcName) throws MalformedURLException, IOException{
		i_logo = Drawable.createFromStream((InputStream) new URL(url).getContent(), srcName);
		return i_logo;
	}
	
	public Drawable setImagenImg(String url, String srcName) throws MalformedURLException, IOException{
		i_imagen = Drawable.createFromStream((InputStream) new URL(url).getContent(), srcName);
		return i_imagen;
	}
	
}